﻿@model DCRepositoriesDto

<style>
    .mat-column-defaultBranch {
        max-width: 20%;
    }
    .mat-column-description {
        max-width: 20%;
    }
    .mat-column-isMirror {
        max-width: 80px;
    }
    .mat-column-isPrivate {
        max-width: 80px;
    }
    .mat-column-name {
        max-width: 20%;
    }
    .mat-column-numIssues {
        max-width: 20%;
    }
    .mat-column-numOpenIssues {
        max-width: 20%;
    }
    .mat-column-numOpenPulls {
        max-width: 20%;
    }
    .mat-column-numPulls {
        max-width: 20%;
    }
    .mat-column-size {
        max-width: 20%;
    }
    .mat-column-userName {
        max-width: 20%;
    }
    .mat-column-creationTime {
        max-width: 100px;
    }
    .mat-column-creatId {
        max-width: 20%;
    }
    .mat-column-lastModifiTime {
        max-width: 20%;
    }
    .mat-column-lastModifiId {
        max-width: 20%;
    }
    .mat-column-operation {
        max-width: 120px;
    }
</style>

<util-toolbar>
    <util-layout>
        <util-textbox model="queryParam.keyword" placeholder="搜索" on-change="search()"></util-textbox>
    </util-layout>
    <util-layout>
        <util-a styles="Icon" tooltip="添加仓库表" link="create">
            <util-icon font-awesome-icon="Plus"></util-icon>
        </util-a>
        <util-button styles="Icon" tooltip="批量删除" on-click="delete()">
            <util-icon material-icon="Delete"></util-icon>
        </util-button>
        <util-button styles="Icon" tooltip="刷新" on-click="refresh()">
            <util-icon material-icon="Sync"></util-icon>
        </util-button>
    </util-layout>
</util-toolbar>

<util-table id="table_DCRepositories" max-height="700" base-url="dCRepositories" query-param="queryParam" sort="CreationTime" sort-direction="Desc">
    <util-table-column type="Checkbox"></util-table-column>
    <util-table-column type="LineNumber"></util-table-column>
    <util-table-column for="DefaultBranch" sort="true"></util-table-column>
    <util-table-column for="Description" sort="true"></util-table-column>
    <util-table-column for="IsMirror" sort="true"></util-table-column>
    <util-table-column for="IsPrivate" sort="true"></util-table-column>
    <util-table-column for="Name" sort="true"></util-table-column>
    <util-table-column for="NumIssues" sort="true"></util-table-column>
    <util-table-column for="NumOpenIssues" sort="true"></util-table-column>
    <util-table-column for="NumOpenPulls" sort="true"></util-table-column>
    <util-table-column for="NumPulls" sort="true"></util-table-column>
    <util-table-column for="Size" sort="true"></util-table-column>
    <util-table-column for="UserName" sort="true"></util-table-column>
    <util-table-column for="CreationTime" sort="true"></util-table-column>
    <util-table-column for="CreatId" sort="true"></util-table-column>
    <util-table-column for="LastModifiTime" sort="true"></util-table-column>
    <util-table-column for="LastModifiId" sort="true"></util-table-column>
    <util-table-column title="操作" column="operation">
        <util-table-cell>
            <util-a styles="Icon" tooltip="编辑" bind-link="['update',row.id]">
                <util-icon material-icon="Edit"></util-icon>
            </util-a>
            <util-button styles="Icon" menu-id="menu">
                <util-icon material-icon="More_Vert"></util-icon>
                <util-menu id="menu">
                    <util-menu-item label="删除" material-icon="Delete" on-click="delete(row.id)"></util-menu-item>
                    <util-menu-item label="详细" material-icon="Visibility" bind-link="['detail',row.id]"></util-menu-item>
                </util-menu>
            </util-button>
        </util-table-cell>
    </util-table-column>
</util-table>